export class mockDataModel {

  getMockData() {
    let list = [{
        articleId: 4241536,
        author: {
          nickName: "羊小羴羴",
          avatUrl: "/images/1.jpg",
        },
        image: {
          height: 1920,
          url: "/images/one.jpg",
          width: 1280
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "清潭洞",
        praiseCount: 1,
        tag: "12月去哪了",
        title: "清潭洞：时尚与财富的结合"
      },
      {
        articleId: 4214881,
        author: {
          nickName: "清清missqing ",
          avatUrl: "/images/3.jpg",
        },
        image: {
          height: 960,
          url: "/images/three.jpg",
          width: 960
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "清潭洞",
        praiseCount: 2,
        tag: "12月去哪了",
        title: "清谭洞的高端韩定食值得一品"
      },
      {
        articleId: 6113885,
        author: {
          nickName: "Molly酱_ ",
          avatUrl: "/images/5.jpg",
        },
        image: {
          height: 1920,
          url: "/images/five.jpg",
          width: 1440
        },
        isLike: true,
        isVideo: "",
        isVip: "",
        poiName: "进丰呈",
        praiseCount: 3,
        tag: "韩国美食",
        title: "韩国美食|体验一把在韩国当贵客的韩定食 韩定食是韩国人招待重要客人时候的一种料理 各种各样的韩国食物"
      },

      {
        articleId: 4214881,
        author: {
          nickName: "木一 ",
          avatUrl: "/images/4.jpg",
        },
        image: {
          height: 1440,
          url: "/images/four.jpg",
          width: 1920
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "首尔",
        praiseCount: 4,
        tag: "网红打卡地",
        title: "首尔。明洞教堂。明洞"
      }, {
        articleId: 6117678,
        author: {
          nickName: "阿米高917",
          avatUrl: "/images/6.jpg",
        },
        image: {
          height: 1920,
          url: "/images/six.jpg",
          width: 1920
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "三星Leeum美术馆",
        praiseCount: 5,
        tag: "韩国旅行",
        title: "首尔旅行 | 打卡超美的三星美术馆  位于江北汉南洞 附近超多网红咖啡店和精品买手店 来了可以逛一天",
      }, {
        articleId: 6075185,
        author: {
          nickName: "Hscorpioo",
          avatUrl: "/images/7.jpg",
        },
        image: {
          height: 1920,
          url: "/images/seven.jpg",
          width: 1440
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "明洞",
        praiseCount: 6,
        tag: "网红打卡地",
        title: "来韩国首尔必逛耳饰店，女孩们的购物天堂！ 一家伪装成书店的耳饰店！！ 性价比太高‍三对8折，五对半折",
      }, {
        articleId: 6049363,
        author: {
          nickName: "RsaLong",
          avatUrl: "/images/8.jpg",
        },
        image: {
          height: 1080,
          url: "/images/eight.jpg",
          width: 1920
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "景福宫",
        praiseCount: 7,
        tag: "换上韩服穿越去首尔",
        title: "号称″韩国的故宫″",
      }, {
        articleId: 6127337,
        author: {
          nickName: "Molly Chang",
          avatUrl: "/images/11.jpg",
        },
        image: {
          height: 534,
          url: "/images/twelve.jpg",
          width: 800
        },
        isLike: true,
        isVideo: "",
        isVip: "",
        poiName: "首尔泡菜文化体验馆",
        praiseCount: 8,
        tag: "换上韩服穿越去首尔",
        title: "今日变身韩服女大厨亲手制作辣白菜泡菜！  在首尔的泡菜学院，泡菜老师会亲自教你如何切萝卜丝，调辣椒酱",
      },
      {
        articleId: 6090410,
        author: {
          nickName: "Ivyy-Jing",
          avatUrl: "/images/9.jpg",
        },
        image: {
          height: 1984,
          url: "/images/my/course.png",
          width: 750
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "弘益大学",
        praiseCount: 9,
        tag: "网红打卡地",
        title: "去首尔怎么能不去弘大逛一逛呢！ 超多路演，小姐姐小哥哥们都集中在下午晚上的时候在路边展示自己的才艺",
      },
      {
        articleId: 5982641,
        author: {
          nickName: "zenbi",
          avatUrl: "/images/13.jpg",
        },
        image: {
          height: 1066,
          url: "/images/thirteen.jpg",
          width: 800
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "首尔",
        praiseCount: 10,
        tag: "网红打卡地",
        title: "首尔 | 韩国工业废墟风鼻祖网红咖啡店  位于城东区的Onion Cafe带起了韩国工业废墟风的潮流",
      },
      {
        articleId: 5997777,
        author: {
          nickName: "请叫我安大侠",
          avatUrl: "/images/14.jpg",
        },
        image: {
          height: 1285,
          url: "/images/fifteen.jpg",
          width: 1920
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "梨泰院",
        praiseCount: 11,
        tag: "来这看最美日落",
        title: "解锁首尔又一条步行街梨泰院  梨泰院曾有着复杂黑暗的历史，现在充满异域风情，酒吧林立，小店清新，各国",
      },
      {
        articleId: 6090299,
        author: {
          nickName: "云雾阳光",
          avatUrl: "/images/6.jpg",
        },
        image: {
          height: 1281,
          url: "/images/seventeen.jpg",
          width: 1920
        },
        isLike: false,
        isVideo: "",
        isVip: "",
        poiName: "首尔",
        praiseCount: 12,
        tag: "颜控最爱的下午茶",
        title: "首尔旅行 | 超高颜值的Dior Cafe下午茶  想来这家Dior House纯粹是被它的外观所俘",
      }
    ];
    return list;
  }


  getWaterFallList() {
    let data = this.getMockData();
    let leftHeight = 0;
    let rightHeight = 0;
    data.forEach((item, index) => {
      if (!item.image.width) {
        item.image.width = 341;
      }
      if (!item.image.height) {
        item.image.height = 341;
      }
      let picHeight = 341 / item.image.width * item.image.height;
      picHeight = parseInt(picHeight);
      item.image.picWidth = 341;
      item.image.picHeight = picHeight;
      if (leftHeight <= rightHeight) {
        item.position = "left";
        leftHeight = leftHeight + picHeight + this.getWaterFallItemContentH();
      } else {
        item.position = "right";
        rightHeight = rightHeight + picHeight + this.getWaterFallItemContentH();
      }
      // if (index % 2 == 0) {
      //   item.position = 'left';
      // } else {
      //   item.position = 'right';
      // }
    })
    return data;
  }

  getWaterFallItemContentH() {
    return 30 + 10 + 50 + 10 + 20;
  }

}